< previous page page_137 next page >

Page 137
To create your class, use the Class Builder utility found in the Visual Basic Add-Ins menu. The first step is to start a Standard EXE project. Don't do anything with the form that is automatically added to the project; you will use it later. The new class, called GetAge, that you will build will have the properties, methods, and events listed in Table 5.2.
TABLE 5.2. NEW CLASS DEFINITIONS.
GroupNameData TypeDescription
PropertyBirthdateStringInput date used to calculate the age of a person
AgeLimitIntegerUsed to set the age limit for the event calculation
AgeIntegerRead-only value containing the calculated age
MethodCalcAgeClass procedure that calculates the age
EventUnderageThis event will be triggered if the calculated age is under the AgeLimit value
OverAgeThis event will be triggered if the calculated age is over the AgeLimit value

To begin the process, start the Class Builder utility to display the Class Builder interface (see Figure 5.3).
12181-0137a.gif
Figure 5.3.
The Class Builder utility helps you define a new class using an Explorer-style application interface.

 
< previous page page_137 next page >

If you like this book, buy it!